import goodsApi from '../../service/goods.service'

const app = getApp()

Page({

  data: {
    goods:[],
    imgs:["../../images/g1.png","../../images/g2.png"]
  },

  onLoad() {
    this.getGoods()
  },

  onShow() {
  },

  getGoods() {
    const self = this;
    let success = function (res) {
      self.setData({goods:res.data.result.datas})
    }

    let fail = function (msg) {
      dd.showToast({
          type: 'fail',
          content: msg
      })
    }
    
    goodsApi.goods({}, success, fail);
  }

})

